<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <title>辕古千年后台</title>
    <!-- Bootstrap core CSS -->
    <link href="{{asset('/layui.css')}}" rel="stylesheet" media="all">
    <link rel="stylesheet" href="{{asset('/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{asset('/dashboard.css')}}">
    <link rel="stylesheet" href="{{asset('/bootstrap-theme.min.css')}}">
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="{{asset('jquery.js')}}"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="{{asset('/bootstrap.min.js')}}"></script>
</head>
<body>

<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">辕古千年后台</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">辕古千年后台</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="javascript:;">{{session("admin_name")}}，欢迎您</a></li>
                <li><a href="/adminLogout" style="color: red">退出</a></li>
            </ul>
        </div>
    </div>
</nav>

<div class="container-fluid">
    <div class="row">
        @include('admin.leftNav')
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <div class="page-header">
                <div class="form-inline">
                    <div class="form-group">
                        <h2>游戏截图 | <small>{{$userJPGInfo->user_jpg_name}}</small></h2>
                    </div>
                    <div class="form-group pull-right">
                        <br><p></p>
                        @if($userJPGInfo->user_jpg_status == 0)
                            <button type="button" class="btn btn-warning  btn-sm" data-toggle="modal" data-target="#changeGameJPG">审核</button>
                        @endif
                        @if($userJPGInfo->user_jpg_status == 1)
                            <button type="button" class="btn btn-danger  btn-sm" data-toggle="modal" data-target="#delGameJPG">删除</button>
                        @endif
                        <div class="modal fade " id="changeGameJPG" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog ">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                        <h4 class="modal-title" id="myModalLabel">审核</h4>
                                    </div>
                                    <div class="modal-body">
                                        {{$userJPGInfo->user_jpg_name}}
                                    </div>
                                    <div class="modal-footer form-inline" >
                                        <div class="form-group">
                                            <form action="/changeUserJPG" method="post">
                                                <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                                <input type="hidden" name="success" value="{{$userJPGInfo->user_jpg_id}}">
                                                <button type="submit" class="btn btn-success">通过</button>
                                            </form>
                                        </div>
                                        <div class="form-group">
                                            <form action="/delUserJPG" method="post">
                                                <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                                <input type="hidden" name="false" value="{{$userJPGInfo->user_jpg_id}}">
                                                <button type="submit" class="btn btn-danger" >不通过</button>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="modal fade " id="delGameJPG" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog ">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                        <h4 class="modal-title" id="myModalLabel">删除</h4>
                                    </div>
                                    <div class="modal-body">
                                        确定要删除吗？
                                    </div>
                                    <div class="modal-footer form-inline" >
                                        <div class="form-group">
                                            <form action="/delUserJPG" method="post">
                                                <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                                <input type="hidden" name="false" value="{{$userJPGInfo->user_jpg_id}}">
                                                <button type="submit" class="btn btn-danger">删除</button>
                                            </form>
                                        </div>
                                        <div class="form-group">
                                            <button  class="btn btn-default" data-dismiss="modal">返回</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


            @if(session('__Ajax_RedirectFunc_status') == true)
                <div>
                    <div class="alert alert-success alert-dismissible fade in" role="alert">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h3>成功</h3>
                        <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
                        <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
                    </div>
                </div>
            @endif
            @if(session('__Ajax_RedirectFunc_status') === false)
                <div >
                    <div class="alert alert-danger alert-dismissible fade in" role="alert">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h3>失败</h3>
                        <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
                        <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
                    </div>
                </div>
            @endif
            <div class="panel-body" >
                <h3 style="text-align: center"><strong>{!! $userJPGInfo->user_jpg_name !!}</strong></h3>
                <h5 style="text-align: center">发布时间：{!! $userJPGInfo->user_jpg_time !!}</h5>
                <hr>
                <img src="{{$userJPGInfo->user_jpg_address}}">
            </div>
        </div>
    </div>
</body>
</html>